import request from '@/config/axios'

// 话术库答复辞 VO
export interface ReplyVO {
  id: number // 答复id
  branchId: number // 分支id
  name: string // 答复名称
  info: string // 答复内容
  remark: string // 备注
}

// 话术库答复辞 API
export const ReplyApi = {
  // 查询话术库答复辞分页
  getReplyPage: async (params: any) => {
    return await request.get({ url: `/system/reply/page`, params })
  },

  // 查询话术库答复辞详情
  getReply: async (id: number) => {
    return await request.get({ url: `/system/reply/get?id=` + id })
  },

  // 新增话术库答复辞
  createReply: async (data: ReplyVO) => {
    return await request.post({ url: `/system/reply/create`, data })
  },

  // 修改话术库答复辞
  updateReply: async (data: ReplyVO) => {
    return await request.put({ url: `/system/reply/update`, data })
  },

  // 删除话术库答复辞
  deleteReply: async (id: number) => {
    return await request.delete({ url: `/system/reply/delete?id=` + id })
  },

  // 导出话术库答复辞 Excel
  exportReply: async (params) => {
    return await request.download({ url: `/system/reply/export-excel`, params })
  },
}